package com.imooc.dto;

import com.imooc.entity.Shop;
import com.imooc.enums.ShopStateEnum;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Create By Liuqz
 * @date 2018/12/19 14:40
 */
@Getter
@NoArgsConstructor
public class ShopExecution {

    private int state;

    private String stateInfo;

    private int count;

    private Shop shop;

    private List<Shop> shopList;

    /**
     * 获取商品信息失败
     * @param shopStateEnum
     */
    public ShopExecution(ShopStateEnum shopStateEnum) {
        this.state = shopStateEnum.getState();
        this.stateInfo = shopStateEnum.getStateInfo();
    }

    /**
     * 获取单个商品信息
     * @param shopStateEnum
     * @param shop
     */
    public ShopExecution(ShopStateEnum shopStateEnum, Shop shop) {
        this.state = shopStateEnum.getState();
        this.stateInfo = shopStateEnum.getStateInfo();
        this.shop = shop;
    }

    /**
     * 获取商品列表信息
     * @param shopStateEnum
     * @param shopList
     */
    public ShopExecution(ShopStateEnum shopStateEnum, List<Shop> shopList) {
        this.state = shopStateEnum.getState();
        this.stateInfo = shopStateEnum.getStateInfo();
        this.shopList = shopList;
    }


}
